package com.zq.im.api;

import com.zq.im.bean.BaseModel;
import com.zq.im.bean.FriendBean;
import com.zq.im.bean.FriendListBean;
import com.zq.im.bean.NullBean;
import com.zq.im.bean.RequestedFriendListBean;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by 张强 869518570@qq.com on 2020/8/26
 */
public interface FriendsApi {

    /**
     * 好友列表
     *
     * @param userId
     * @return
     */
    @GET("/webchat/api/user/myFriends")
    Call<BaseModel<List<FriendListBean>>> getFriends(@Query("userId") String userId);

    /**
     * 好友请求列表
     */
    @GET("/webchat/api/user/queryFriendRequest")
    Call<BaseModel<List<RequestedFriendListBean>>> getRequestedFriends(@Query("userId") String userId);

    /**
     * /webchat/api/user/searchFriend
     * 搜索好友
     */
    @GET("/webchat/api/user/searchFriend")
    Call<BaseModel<FriendBean>> searchFriend(@Query("myUserId") String userId, @Query("friendUserName") String friendUserName);


    /**
     * /webchat/api/user/addFriendRequest
     */
    @GET("/webchat/api/user/addFriendRequest")
    Call<BaseModel<NullBean>> addFriend(@Query("myUserId") String userId, @Query("friendUserName") String friendUserName);

    /**
     * 处理好友请求
     *
     * @param acceptUserId 接受者Id
     * @param sendUserId   发送好友请求Id
     * @param operType     0忽略1通过
     */
    @GET("/webchat/api/user/operFriendRequest")
    Call<BaseModel<NullBean>> confirmRequest(@Query("acceptUserId") String acceptUserId,
                                             @Query("sendUserId") String sendUserId,
                                             @Query("operType") String operType);

}
